////#include<iostream>
////
////using namespace std;
////typedef long long ll;
////
////const int N = 1e8 + 10, n = 1e8;
////bool is[N];
////int p[N];
////int cnt;
////
////int main()
////{
////    for (int i = 2; i <= n; i++)
////    {
////        if (!is[i]) p[++cnt] = i;
////        for (int j = 1; p[j] <= n / i; j++)
////        {
////            is[i * p[j]] = true;
////            if (i % p[j] == 0) break;
////        }
////    }
////    int t;
////    while (cin >> t)
////    {
////        int ret = 0;
////        for (int i = 2; p[i] <= t / 2; i++)
////        {
////            if (!is[t - p[i]]) ret++;
////        }
////        cout << ret << endl;
////    }
////    return 0;
////}
//
////#include<iostream>
////#include<cmath>
////using namespace std;
////
////int main()
////{
////	int n; 
////	while (cin >> n)
////	{
////		printf("%d\n", (int)(n - log10(n) - log10(log(10)) + 1));
////	}
////	return 0;
////}
//
//#include<iostream>
//
//using namespace std;
//typedef long long ll;
//
//const int N = 1e8 + 10, n = 1e8;
//bool is[N];
//int p[N];
//int cnt;
//
//int main()
//{
//    for (ll i = 2; i <= n; i++)
//    {
//        if (!is[i]) p[++cnt] = i;
//        for (int j = 1; i * p[j] <= n; j++)
//        {
//            is[i * p[j]] = true;
//            if (i % p[j] == 0) break;
//        }
//    }
//    int t;
//    while (cin >> t)
//    {
//        int ret = 0;
//        for (int i = 2; p[i] <= t / 2; i++)
//        {
//            if (!is[t - p[i]]) ret++;
//        }
//        cout << ret << endl;
//    }
//    return 0;
//}